﻿namespace Hotel.Web.Models
{
    using System.ComponentModel.DataAnnotations;

    public class Admin
    {
        [Required(ErrorMessageResourceType = typeof(Hotel.Web.Views.Shared.Validation), ErrorMessageResourceName = "RequiredErrorMessage")]
        [Display(ResourceType = typeof(Hotel.Web.Views.Administrator.Resource), Name = "Login")]
        [StringLength(20, MinimumLength = 1, ErrorMessageResourceType = typeof(Hotel.Web.Views.Administrator.Resource), ErrorMessageResourceName = "LoginError")]
        public string Login { get; set; }

        [Required(ErrorMessageResourceType = typeof(Hotel.Web.Views.Shared.Validation), ErrorMessageResourceName = "RequiredErrorMessage")]
        [Display(ResourceType = typeof(Hotel.Web.Views.Administrator.Resource), Name = "Password")]
        [StringLength(20, MinimumLength = 6, ErrorMessageResourceType = typeof(Hotel.Web.Views.Administrator.Resource), ErrorMessageResourceName = "PasswordError")]
        public string Password { get; set; }

        [Required(ErrorMessageResourceType = typeof(Hotel.Web.Views.Shared.Validation), ErrorMessageResourceName = "RequiredErrorMessage")]
        [Display(ResourceType = typeof(Hotel.Web.Views.Administrator.Resource), Name = "SelectedRole")]
        public CurrSelectedRole SelectedRole
        {
            get
            {
                return currSelectedRole;
            }
            set
            {
                currSelectedRole = value;
            }
        }

        public enum CurrSelectedRole
        {
            Reception, Cleaners, Repairman, Administrators
        }
        private CurrSelectedRole currSelectedRole;
    }
}